package fr.epsi.activities.employe;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Debug;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import com.example.MyLittleHotel.R;

/**
 * Created by Florent Baudon on 15/05/2014.
 */
public class EmployeActivity extends Activity implements View.OnClickListener {

    ImageButton ajouter, consulter;

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.employelayout);

        ajouter = (ImageButton) findViewById(R.id.accesAjoutEmp);
        consulter = (ImageButton) findViewById(R.id.consulterEmp);

        ajouter.setOnClickListener(this);
        consulter.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        ImageButton b = (ImageButton)v;
        if(b==ajouter){
            Intent a = new Intent(this, AjouterEmployeActivity.class);
            startActivity(a);
        }
        if(b==consulter){
            Intent i =new Intent(this, ConsulterEmployeActivity.class);
            startActivity(i);
        }
    }
}